import request from '@/utils/request/request';
// 分页查询供应商到货API数据
export function getPmsDcdProdPage(params: any) {
  return request.get('/api/procurement/order/dcd-prod/page', {
    params,
  });
}
// 新增机载产品单件代码到货API
export function savePmsDcdProdDetail(data: any) {
  return request.post('/api/procurement/order/receive-detail', data);
}

// 修改机载产品单件代码API
export function editPmsDcdProdDetail(data: any) {
  return request.put('/api/procurement/order/receive-detail', data);
}

// 根据机载产品单件代码APIid查API详细信息
export function getPmsDcdProdDetailDetailInfoById(id: string) {
  return request.get(`/api/procurement/order/receive-detail/${id}`);
}

// 删除机载产品单件代码API
export function deletePmsDcdProdDetail(id: string) {
  return request.delete(`/api/procurement/order/receive-detail/${id}`);
}
// 上传文件
export function uploadFile(data: FormData, params) {
  return request.post('/api/procurement/order/dcd-prod/fileUpload', data, {
    params,
    headers: {
      'Content-Type': 'application/form-data',
    },
  });
}
